#!/usr/bin/perl
use strict;
use warnings;
use lib "/NetWorkerScripte/nsr_perl_mods";
use networker;

my $outfile="/NetWorkerScripte/marcel/networker_savestate.csv";
my $currenttime=localtime();
my @sessions=&nsradmin_get(show=>"sessions",query=>"type:nsr");
chomp @sessions;
foreach @sessions {
my ($client,$pool,$volume)=split(/\"s*'\s*' (\s*)/);

}


#my ($client,$volume)=split(',',$statistics[1]);
my $currentdata=sprintf ("%s\t%s\t%s\t\%s\n",$currenttime,$client,$pool,$volume);
print $currentdata;

#exit 0;
#open(OUT,">>$outfile");
#print OUT $currentdata;
#close OUT;

exit 0;

~
